import { defineStore } from "pinia";
import { shallowRef } from "vue";
import { ApiUser } from "../../api";

export const useDashboardStore = defineStore(
  "dashboard",

  () => {
    const userFuncs = shallowRef<UI.Func[]>([]);
    const init = async () => {
      userFuncs.value = await ApiUser.getMenu();
    };
    return { userFuncs, init };
  },
  {
    persist: true,
  }
);
